<template>
  <view class="audit-item content">
    <view class="header">
      <view class="t">
        <text>审核通知</text>
      </view>
      <image class="img" src="/static/passed.png" mode="aspectFill"></image>
    </view>
    <view class="message">
      <view class="t">{{ data.smsContent }}</view>
      <view class="btn_group">
        <view class="btn" @click="goPage('shop')">创建店铺</view>
        <view class="btn" @click="goPage('goods')">创建商品</view>
      </view>
    </view>
  </view>
</template>

<script setup>
  import { ref } from 'vue';

  const props = defineProps({
    data: Object,
  });

  function goPage(type) {
    if (type === 'goods') {
      uni.navigateTo({
        url: '/pagesB/goods/index?from=home',
      });
    } else {
      uni.navigateTo({
        url: '/pagesB/shop/index?from=home',
      });
    }
  }
  // 暴露方法
  defineExpose({});
</script>

<style lang="scss" scoped>
  .content {
    background-color: #fff;
    padding: 20rpx;
    border-radius: 16rpx;
    box-sizing: border-box;
    margin-bottom: 30rpx;
  }
  .audit-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 20rpx;

    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10rpx;
      box-sizing: border-box;

      .t {
        font-weight: 500;
        font-size: 26rpx;
        color: #1e2737;
      }

      .img {
        width: 107rpx;
        height: 37rpx;
        vertical-align: middle;
      }
    }

    .message {
      .t {
        font-size: 22rpx;
        color: #1e2737;
        opacity: 0.8;
        margin-bottom: 20rpx;
      }

      .btn_group {
        .btn {
          display: inline-block;
          padding: 13rpx 27rpx;
          border: 2rpx solid #4287f6;
          color: #4287f6;
          margin-right: 15rpx;
          border-radius: 50rpx;
          box-sizing: border-box;
          font-weight: 500;
          font-size: 20rpx;
        }
      }
    }
  }
</style>
